package com.zhongkun.datahome.service.constant;

import lombok.Getter;

/**
 * @Author: lifengsheng
 * @Date: 2025/4/18 13:58
 * @Desc
 */
@Getter
public enum DataAssetsTypeEnum {
    ARTICLE("article", "文章"),
    PICTURE("picture", "图片"),
    VIDEO("video", "视频"),
    PANORAMA("panorama", "全景图"),
    OTHER_FILE("other_file", "文件")
    ;

    private String type;

    private String desc;

    DataAssetsTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public boolean is(String type) {
        return this.type.equals(type);
    }

    public static String getDesc(String type) {
        for (DataAssetsTypeEnum typeEnum : DataAssetsTypeEnum.values()) {
            if (typeEnum.is(type)) {
                return typeEnum.desc;
            }
        }
        return null;
    }
}
